gh-143820: ENTER_EXECUTOR can be inserted after BINARY_OP_INPLACE_ADD_UNICODE#143894
gh-143820: ENTER_EXECUTOR can be inserted after BINARY_OP_INPLACE_ADD_UNICODE#143894Fidget-Spinner wants to merge 5 commits intopython:mainfrom
Conversation
markshannon
left a comment
There was a problem hiding this comment.
Provided that _BINARY_OP_INPLACE_ADD_UNICODE leaves the VM in a valid state (and I believe it does), then it doesn't matter if the following STORE_FAST is replaced by ENTER_EXECUTOR or instrumented.
It is the assert that needs changing. You'll need to use _Py_GetBaseCodeUnit
|
When you're done making the requested changes, leave the comment: |
It matters because we get the next instruction's oparg and check it |
|
We need to check for |
markshannon
left a comment
There was a problem hiding this comment.
The test case seems to have a lot of extra stuff in it, but no check that it is testing what it is supposed to be testing.
Can we tidy it up and add a check that it it working?
| # https://github.com/python/cpython/issues/143358 | ||
|
|
||
| result = script_helper.run_python_until_end('-c', textwrap.dedent(f""" | ||
| import sys |
There was a problem hiding this comment.
There seems like a lot of extraneous stuff in this test, and no check that the STORE_FAST is overwritten by an ENTER_EXECUTOR.
There was a problem hiding this comment.
The test comes from the repro provided by the OP bug report. We just require it to not fail. I'm reluctant to spend more time reducing this.
|
We could avoid accessing the following instruction's |
next_instr->op.code == STORE_FASTfailed in_PyEval_EvalFrameDefault#143820